package com.umgsai.thread.thread01;

public class MyThread10 extends Thread {

	@Override
	public void run() {
		super.run();
//		for (int i = 0; i < 5000; i++) {
//			System.out.print("");
//		}
		System.out.println("run end");
	}

	public static void main(String[] args) {
		try {
			MyThread10 thread = new MyThread10();
			thread.start();
			// Thread.sleep(10);
			System.err.println("是否停止0？" + thread.getName() + "-" + thread.isInterrupted());// false
			thread.interrupt();
			// System.out.println("是否停止1？ " + Thread.currentThread().getName() +
			// "-" + thread.interrupted());//false “当前线程”是main
			// Thread.sleep(5000);
			// System.out.println("是否停止2？ " + Thread.currentThread().getName() +
			// "-" + thread.interrupted());//false “当前线程”是main
			System.err.println("是否停止4？" + thread.getName() + "-" + thread.isInterrupted());// false
		} catch (Exception e) {
			e.printStackTrace();
		}
		System.out.println("main end");
	}
}
